#ifndef _X_NET_THREAD_H
#define _X_NET_THREAD_H
#include "xDef.h"
#include "xThread.h"
#include "xTCPTaskQueue.h"
#include <sys/epoll.h>
#include <unistd.h>
#include <deque>
namespace xNet
{
    NET_ENGINE_CORE_API class xNetThread : public xThread , public xTCPTaskQueue
    {
        public:
            xNetThread();
            ~xNetThread();
        public:
            virtual bool Run() override;
            virtual void Finish() override;
        public:
            void CheckState();
        private:
            typedef std::vector<struct epoll_event> EPollEventContainer;
            EPollEventContainer m_events;
            uint32 m_eventSize;
            EPOLL_FD m_epFd;
    };
}

#endif